﻿using System;
using UnityEngine;

// Token: 0x020001B9 RID: 441
public class CutAct_GameVariable : CutAction
{
	// Token: 0x06000B72 RID: 2930 RVA: 0x000433F0 File Offset: 0x000415F0
	public CutAct_GameVariable(CutScene cutScene) : base(cutScene, CUTACT.GAMEVARIABLE)
	{
	}

	// Token: 0x06000B73 RID: 2931 RVA: 0x000433FC File Offset: 0x000415FC
	public CutAct_GameVariable(CutScene cutScene, float time, string type, string val) : base(cutScene, CUTACT.GAMEVARIABLE, time)
	{
		this.type = type;
		this.val = val;
	}

	// Token: 0x06000B74 RID: 2932 RVA: 0x00043418 File Offset: 0x00041618
	public override object Clone()
	{
		return new CutAct_GameVariable(this.cutScene);
	}

	// Token: 0x06000B75 RID: 2933 RVA: 0x00043428 File Offset: 0x00041628
	public override void Load(TagText.Element element, int order)
	{
		base.Load(element, order);
		element.GetVal(ref this.type, "type", 0);
		element.GetVal(ref this.val, "val", 0);
	}

	// Token: 0x06000B76 RID: 2934 RVA: 0x00043458 File Offset: 0x00041658
	public override void Save(TagText.Element element)
	{
		base.Save(element);
		element.AddAttribute("type", this.type);
		element.AddAttribute("val", this.val);
	}

	// Token: 0x06000B77 RID: 2935 RVA: 0x00043484 File Offset: 0x00041684
	public override void Action(bool skip)
	{
		if (this.type.Equals("progress", StringComparison.OrdinalIgnoreCase))
		{
			bool flag = false;
			string[] names = Enum.GetNames(typeof(GamePlayData.PROGRESS));
			for (int i = 0; i < names.Length; i++)
			{
				if (this.val.Equals(names[i], StringComparison.OrdinalIgnoreCase))
				{
					GlobalData.PlayData.Progress = (GamePlayData.PROGRESS)i;
					flag = true;
					break;
				}
			}
			if (!flag)
			{
				GlobalData.Debug_LogWarning("不确切値:" + this.val);
			}
		}
		else
		{
			GlobalData.Debug_LogWarning("不确切変数:" + this.type);
		}
	}

	// Token: 0x04000BBC RID: 3004
	public string type;

	// Token: 0x04000BBD RID: 3005
	public string val;
}
